<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/inc/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>update user info</title>
<%@ include file="/inc/head.jsp"%>
<script type="text/javascript">
	var submitForm = function($dialog, $grid, $pjq) {
		var url;
		if ($(':input[name="id"]').val().length > 0) {
			url = sy.contextPath + '/sys/user/update';
		} else {
			url = sy.contextPath + '/sys/user/create';
		}
		$.post(url, sy.serializeObject($('form')), function(result) {
			if (result.success) {
				$pjq.messager.alert('提示', result.msg, 'info');
				$grid.datagrid('load');
				$dialog.dialog('destroy');
			} else {
				$pjq.messager.alert('提示', result.msg, 'error');
			}
		}, 'json');
	}
</script>
</head>
<body>

	<form:form method="post" commandName="m">
		<fieldset>
			<legend>用户信息</legend>
			<form:hidden path="id" />
			<form:hidden path="deleted" />
			<form:hidden path="salt" />
			<table>
				<tr>
					<td><form:label path="fullName" cssClass="control-label">姓名</form:label></td>
					<td><form:input path="fullName" cssClass="easyui-validatebox"
							data-options="required:true" /></td>
				</tr>
				<tr>
					<td><form:label path="username" cssClass="control-label">登录ID</form:label></td>
					<td><form:input path="username" cssClass="easyui-validatebox"
							data-options="required:true" /></td>
				</tr>
				<tr>
					<td><form:label path="email" cssClass="control-label">Email</form:label></td>
					<td><form:input path="email" cssClass="easyui-validatebox"
							data-options="required:false,validType:'email'" /></td>
				</tr>
				<tr>
					<td><form:label path="mobilePhoneNumber"
							cssClass="control-label">电话号码</form:label></td>
					<td><form:input path="mobilePhoneNumber"
							cssClass="easyui-validatebox" data-options="required:false" /></td>
				</tr>
				<tr>
					<td><form:label path="password" cssClass="control-label">初始密码</form:label></td>
					<td><form:password path="password"
							cssClass="easyui-validatebox" data-options="required:true" /></td>
				</tr>
				<tr>
					<td><form:label path="admin" cssClass="control-label">是否管理员</form:label></td>
					<td><form:radiobuttons path="admin" items="${booleanList}"
							itemLabel="info" itemValue="value" /></td>
				</tr>
				<tr>
					<td><form:label path="status" cssClass="control-label">状态</form:label></td>
					<td><form:radiobuttons path="status" items="${statusList}"
							itemLabel="info" /></td>
				</tr>
			</table>
		</fieldset>
	</form:form>
</body>
</html>
